'''
 * @ author     ：廖传港
 * @ date       ：Created in 2020/11/5 20:53
 * @ description：
 * @ modified By：
 * @ ersion     : 
 * @File        : test.py 
'''
#三维变二维代码
# import numpy as np
#
# x = np.arange(12).reshape((2, 3, 2))
# print(x.shape)
# np.array([[[0, 1],
#         [2, 3],
#         [4, 5]],
#
#        [[6, 7],
#         [8, 9],
#         [10, 11]]])
#
# x = x.reshape(x.shape[0], -1)
# # x = x.reshape(x.shape[0], 3*2)
# print(x)
# np.array([[0, 1, 2, 3, 4, 5],
#        [6, 7, 8, 9, 10, 11]])
#
# print(x.shape)


# # 彩色图片变灰度图片
# from PIL import Image
# import numpy as np
#
# # 加载RGB图片
# I = Image.open('D:/python/data/test/1.jpg')
# I.show()
# y=np.array(I)
# print(y.shape)
#
# # 转换为灰度图片
# L = I.convert('L')
# x=np.array(L)
# print(x.shape)
# # L.show()
# # L.save('D:/python/data/test/11.jpg')


# import random
#
# aa = [1, 2, 3, 4, 5, 6]
# bb = [1, 2, 3, 4, 5, 6]
#
# cc = list(zip(aa, bb))
# random.shuffle(cc)
# aa[:], bb[:] = zip(*cc)
# print(aa, bb)
# 输出为：[1, 3, 5, 2, 4, 6] [1, 3, 5, 2, 4, 6]


# import numpy as np
#
# a = np.arange(0, 10, 1)
# b = np.arange(10, 20, 1)
# print(a, b)
# # result:[0 1 2 3 4 5 6 7 8 9] [10 11 12 13 14 15 16 17 18 19]
# state = np.random.get_state()
# np.random.shuffle(a)
# print(a)
# # result:[6 4 5 3 7 2 0 1 8 9]
# np.random.set_state(state)
# np.random.shuffle(b)
# print(b)
# # result:[16 14 15 13 17 12 10 11 18 19]


# from sklearn import preprocessing
# import numpy as np
# X = np.array([[ 1., -1.,  2.],[ 2.,  0.,  0.],[ 0.,  1., -1.]])
# X_scaled = preprocessing.scale(X)
# print(X_scaled)



class DNN:

    def __init__(self):

        self.layers = []

    # 在前一层的基础上继续追加层
    def Add(self, layer):
        print("xxxxxxxxxxxxxxxxxxxxxxx")


    def Forward(self, X):
        print("yyyyyyyyyyyyyyyyyyyy")

if __name__ == '__main__':

    dnn=DNN()
    dnn.Add(33)
